<?php
namespace products;

use Exception;
use bank\BankUtils;

abstract class Deposit extends BankProduct {
	
	private $monthlyDivident;
	
	public function __construct($accountName, $interestPerYear, $timePeriod, $currentMoneyAmount) {
		
		parent::__construct($accountName, $interestPerYear, $timePeriod, $currentMoneyAmount);
		
		$this->setMonthlyDivident();
		
	}
	
	public function setMonthlyDivident() {
		
		$this->monthlyDivident = BankUtils::calculateDepositMontlyPayment($this->currentMoneyAmount, $this->interestPerYear);
	}
	
	public function getMonthlyDivident() {
		
		return $this->setMonthlyDivident();
	}
}